package com.mashibing.strategy;

public class CatWeightComparator implements Comparator<Cat>{
    @Override
    public int compare(Cat O1, Cat O2) {
        if (O1.weight<O2.weight) {
            return -1;
        } else if (O1.weight>O2.weight) {
            return 1;
        } else {
            return 0;
        }
    }
}
